import warnings
from mmcv.utils import Registry

MODELS = Registry('models')

LOSSES = Registry('losses')

def build_loss(cfg):
    """Build loss function."""
    return LOSSES.build(cfg)

def build_model(cfg):
    """Build model function."""
    return MODELS.build(cfg)
